#!/bin/bash

# enter trunk
if [ "$1" != "" ]  #if parameter exists, use as base folder
   then cd "$1"
else
   cd "../.."
   fi
echo Ignoring files in `pwd`

echo  *.o > ../ignorelst.tmp
echo  *.lo >> ../ignorelst.tmp
echo  *.la >> ../ignorelst.tmp
echo  *.rej >> ../ignorelst.tmp
echo  *.pyc >> ../ignorelst.tmp
echo  *.log >> ../ignorelst.tmp
echo  *.tmp >> ../ignorelst.tmp
echo  .*~ >> ../ignorelst.tmp
echo  .DS_Store >> ../ignorelst.tmp
echo  thumbs.db >> ../ignorelst.tmp
echo  Thumbs.db >> ../ignorelst.tmp
echo  *.bak >> ../ignorelst.tmp
echo  *.class >> ../ignorelst.tmp
echo  *.exe >> ../ignorelst.tmp
echo  *.dll >> ../ignorelst.tmp
echo  *.mine >> ../ignorelst.tmp
echo  *.obj >> ../ignorelst.tmp
echo  *.ncb >> ../ignorelst.tmp
echo  *.lib >> ../ignorelst.tmp
echo  *.log >> ../ignorelst.tmp
echo  *.idb >> ../ignorelst.tmp
echo  *.pdb >> ../ignorelst.tmp
echo  *.ilk >> ../ignorelst.tmp
echo  *.msi* >> ../ignorelst.tmp
echo  .res >> ../ignorelst.tmp
echo  *.pch >> ../ignorelst.tmp
echo  *.suo >> ../ignorelst.tmp
echo  *.exp >> ../ignorelst.tmp
echo  *.*~ >> ../ignorelst.tmp
echo  *.~* >> ../ignorelst.tmp
echo  ~*.* >> ../ignorelst.tmp
echo  cvs >> ../ignorelst.tmp
echo  CVS >> ../ignorelst.tmp
echo  .CVS >> ../ignorelst.tmp
echo  .cvs >> ../ignorelst.tmp
echo  release >> ../ignorelst.tmp
echo  Release >> ../ignorelst.tmp
echo  debug >> ../ignorelst.tmp
echo  Debug >> ../ignorelst.tmp
echo  ignore* >> ../ignorelst.tmp
echo  Ignore >> ../ignorelst.tmp
echo  bin >> ../ignorelst.tmp
echo  Bin >> ../ignorelst.tmp
echo  obj >> ../ignorelst.tmp
echo  Obj >> ../ignorelst.tmp
echo  *.csproj.user >> ../ignorelst.tmp
echo  *.user >> ../ignorelst.tmp

echo  current_changes.txt >> ../ignorelst.tmp


svn propset -R svn:ignore -F ../ignorelst.tmp .
rm ../ignorelst.tmp


